Skip to content

Add incident response#679

Merged
Junirezz merged 3 commits into
Junirezz:mainfrom
teeschima:Add-incident-response
Jun 1, 2026
Merged

Add incident response#679
Junirezz merged 3 commits into
Junirezz:mainfrom
teeschima:Add-incident-response

Conversation

@teeschima
Copy link
Copy Markdown
Contributor

Close #576

Pull Request – Add-incident-response

Title:
Add guard‑check implementation & incident‑response runbook

Description:

This PR introduces two major improvements to the YieldVault project:

  1. Same‑ledger exploit mitigation

    • Added per‑user ledger‑sequence tracking (LastActionSeq) and a new VaultError::RapidAction.
    • Guard checks now reject a deposit followed by a withdraw (or vice‑versa) within the same ledger, preventing flash‑loan‑style attacks.
    • Updated deposit and withdraw functions to enforce the cooldown and emit the new error.
    • Added comprehensive tests (guard_checks_test.rs) that verify:
      • Failure when deposit and withdraw occur in the same ledger.
      • Success when the ledger is advanced between actions.
  2. Operational runbook

    • Created docs/incident_response_runbook.md documenting detection, alerting, triage, mitigation, and recovery procedures for RPC degradation and transaction delivery failures.
    • Includes metric thresholds, step‑by‑step mitigation actions, recovery verification, and post‑mortem guidance.

Files added / modified

Path Change
contracts/vault/src/lib.rs New storage entry, error enum variant, guard logic in deposit & withdraw.
contracts/vault/tests/guard_checks_test.rs New integration test suite for the guard checks.
docs/incident_response_runbook.md New operational runbook.
(other minor formatting updates)

Branch: Add-incident-response
PR URL: https://github.com/teeschima/YieldVault-RWA/pull/new/Add-incident-response

Please review the changes, add any reviewers, and merge when approved. Let me know if you need any additional documentation or adjustments.

@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented Jun 1, 2026

@teeschima Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Junirezz Junirezz merged commit cdedce9 into Junirezz:main Jun 1, 2026
10 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Documentation: Add incident response runbook for degraded RPC and webhook outages

2 participants